package com.zmt.xuechengplusbase.exception;

public class xuechengplusException extends RuntimeException{
    private String errMessage;

    public xuechengplusException() {
    }

    public String getErrMessage() {
        return errMessage;
    }

    public void setErrMessage(String errMessage) {
        this.errMessage = errMessage;
    }

    public xuechengplusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public static void cast(String errMessage){
        throw new xuechengplusException(errMessage);
    }
    public static void cast(CommonError error){
        throw new xuechengplusException(error.getErrMessage());
    }

}
